<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/8/7
  Time: 16:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="com.sun.bean.Books" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<head>
    <%
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    %>
    <!-- 基准路径 -->
    <base href="<%=basePath%>">
    <title>Title</title>
    <style>
        body{
            background: url("/img/29.jpg");
            background-size: 100%;
        }
        h1{
            margin-top: 160px;
        }
        table{
            height: 250px;
            width: 600px;
            color: #00FFFF;
        }

        input{
            color: #00FFFF;
            background-color:transparent;
        }
    </style>
</head>
<body>

<h1 align="center">图&nbsp;&nbsp;&nbsp;书&nbsp;&nbsp;&nbsp;修&nbsp;&nbsp;&nbsp;改</h1>
<form action="books?method=updateBo" method="post" enctype="multipart/form-data">

    <table border="1PX" align="center" width="500px" cellspacing="0">
        <tr>
            <th>编号</th>
            <td>
                <input readonly type="text" name="id" value="${bk.id}">
            </td>
        </tr>

        <tr>
            <th>书贴</th>
            <td>
                <img src="/photo/${stu.photo}">
                <input type="file" name="photo">
                <input type="hidden" name="oldphoto" value="${bk.photo}">
            </td>
        </tr>

        <tr>
            <th>书名</th>
            <td>
                <input type="text" name="bname" value="${bk.bname}">
            </td>
        </tr>
        <tr>
            <th>价格</th>
            <td>
                <input type="text" name="price" value="${bk.price}">
            </td>
        </tr>
        <tr>
            <th>作者</th>
            <td>
                <input type="text" name="author" value="${bk.author}">
            </td>
        </tr>
        <tr>
            <th>出版社</th>
            <td>
                <input type="text" name="press" value="${bk.press}">
            </td>
        </tr>
        <tr>
            <th>日期</th>
            <td>
                <input type="text" name="pubdate" value="${bk.pubdate}">
            </td>
        </tr>
        <tr>
            <th>数量</th>
            <td>
                <input type="text" name="number" value="${bk.number}">
            </td>
        </tr>
        <tr>
            <th>类型</th>
            <td>
                <input type="checkbox" <c:if test="${fn:contains(bk.calssift,'竞技')}">checked</c:if> name="calssift" value="竞技">竞技
                <input type="checkbox" <c:if test="${fn:contains(bk.calssift,'玄幻')}">checked</c:if> name="calssift" value="玄幻">玄幻
                <input type="checkbox" <c:if test="${fn:contains(bk.calssift,'悬疑')}">checked</c:if> name="calssift" value="悬疑">悬疑
                <input type="checkbox" <c:if test="${fn:contains(bk.calssift,'科幻')}">checked</c:if> name="calssift" value="科幻">科幻
            </td>
        </tr>
        <tr>
            <th>状态</th>
            <td>
                <select name="area">
                    <option value="0">请选择状态</option>
                    <option ${bk.area eq 1 ? 'selected' : ''} value="1">热销</option>
                    <option ${bk.area eq 2 ? 'selected' : ''} value="2">完结</option>
                    <option ${bk.area eq 3 ? 'selected' : ''} value="3">下架</option>
                    <option ${bk.area eq 4 ? 'selected' : ''} value="4">付费</option>
                </select>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <input type="submit" value="修改">
                <input type="button" onclick="history.back()" value="返回">
            </td>
        </tr>
    </table>
</form>
</body>
</html>
